/*
 * This file contains common CSS styling for documentation artifacts of all YAKINDU projects. It reverts some changes
 * introduced by the bootstrap framework.
 *
 * Any project-specific changes should not be done here, but rather in the <projectname>.css file.
 */

/*
 * The font size in a blockquote should be the same as specified by the parent element:
 */
.body-container .primary blockquote {
    font-size: inherit;
}

/*
 * For Eclipsehelp, establish proper left and right margins for the body: 
 */
body.eclipsehelp {
    margin-left: 2%;
    margin-right: 3%;
}

/*
 * Revert bootstrap's fancy "code" rendering:
 */
.body-container .primary code {
    padding: 0;
    color: #111111;
    background-color: transparent;
    font-size: 100%;
    border-radius: 0;
}

/*
 * On small screens, allow "unbreakable" words in "code" elements to be broken:
 */
@media ( max-width : 767px) {
    .body-container .primary code {
        word-wrap: break-word;
    }
}

/*
 * Add some vertical space above and below images and tables to separate them from the text:
 */
.body-container .primary img, .body-container .primary table {
    margin-top: 1em;
    margin-bottom: 2em;
}

/*
 * Images should look uniquely. The default settings are as follows:
 * - According to the Golden Cut, the image width is between 38.2 and 61.8 percent. However, this is not suited for all
 *   images. There are CSS classes to e.g. render an image at full width or at a small fraction of the view port size.
 * - Images are centered.
 * - Images have a shadow with a certain corner radius.
 */
.body-container .primary img {
    height: auto;
    text-align: center;
    display: block;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 5px 5px 20px #888888;
    -webkit-box-shadow: 5px 5px 20px #888888;
    -moz-box-shadow: 5px 5px 20px #888888;
    border-radius: 0px;
}

/*
 * Embedded videos (iframe) should be centered
 */
.body-container .primary iframe {
    text-align: center;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/*
 * Use the CSS class "inlinemediaobject" to include small images like symbols or buttons within a paragraph of text
 * similar to a character. The image is scaled to have the height of the line.
 */
.body-container .primary img.inlinemediaobject {
    line-height: 1;
    vertical-align: baseline;
    min-width: inherit;
    max-width: inherit;
    width: inherit;
    height: 1em;
    text-align: inherit;
    display: inline;
    margin-left: 0px;
    margin-right: 0px;
    margin-top: 0px;
    margin-bottom: 0px;
    box-shadow: none;
    border-radius: 0px;
}

/*
 * CSS class "shadowless" for images that should not have a shadow.
 */
.body-container .primary img.shadowless {
    box-shadow: none;
    margin-bottom: 0px;
}

/*
 * Responsive design: image widths for normal and wide viewports:
 */
@media ( min-width : 30em) {
    .body-container .primary img {
        max-width: 61.8%;
        min-width: 38.2%;
    }
    .body-container .primary img.tiny {
        width: 23.6%;
        max-width: 23.6%;
        min-width: 23.6%;
    }
    .body-container .primary img.small {
        width: 38.2%;
        max-width: 38.2%;
        min-width: 38.2%;
    }
    .body-container .primary img.normal {
        width: 61.8%;
        max-width: 61.8%;
        min-width: 38.2%;
    }
    .body-container .primary img.large {
        width: 76.4%;
        max-width: 76.4%;
        min-width: 38.2%;
    }
    .body-container .primary img.full {
        width: 100%;
        max-width: 100%;
        min-width: 38.2%;
    }
}

/*
 * Responsive design: image widths for small viewports:
 */
@media ( max-width : 30em) {
    .body-container .primary img {
        width: 100%;
        max-width: 100%;
    }
    .body-container .primary img.tiny {
        width: 61.8%;
        max-width: 61.8%;
    }
    .body-container .primary img.small {
        width: 76.4%;
        max-width: 76.4%;
    }
    .body-container .primary img.normal, .body-container .primary img.large, .body-container .primary img.full {
        max-width: 100%;
        min-width: 100%;
    }
}

/*
 * Tables:
 */
.body-container .primary table, .body-container .primary th, .body-container .primary td {
    border: 0px solid black;
}

.body-container .primary table {
    border-collapse: collapse;
    max-width: 100%;
}

.body-container .primary th {
    color: #ffffff;
    background-color: #575757;
}

.body-container .primary th, .body-container .primary td {
    padding-top: 0.2em;
    padding-bottom: 0.2em;
    padding-left: 0.5em;
    padding-right: 0.5em;
    text-align: left;
    vertical-align: top;
}

.body-container .primary tr:nth-child(even) {
    background-color: #cfe3fc;
}

.body-container .primary tr.odd {
    background-color: inherit;
}

.body-container .primary tr.even {
    background-color: #cfe3fc;
}

/*
 * Chapter numbering:
 */
.body-container .primary {
    counter-reset: h1
}

.body-container .primary h1 {
    counter-reset: h2
}

.body-container .primary h2 {
    counter-reset: h3
}

.body-container .primary h3 {
    counter-reset: h4
}

.body-container .primary h4 {
    counter-reset: h5
}

.body-container .primary h5 {
    counter-reset: h6
}

.body-container .primary  h1:before {
    counter-increment: h1;
    content: counter(h1) ". "
}

.body-container .primary h2:before {
    counter-increment: h2;
    content: counter(h1) "." counter(h2) ". "
}

.body-container .primary h3:before {
    counter-increment: h3;
    content: counter(h1) "." counter(h2) "." counter(h3) ". "
}

.body-container .primary h4:before {
    counter-increment: h4;
    content: counter(h1) "." counter(h2) "." counter(h3) "." counter(h4) ". "
}

.body-container .primary h5:before {
    counter-increment: h5;
    content: counter(h1) "." counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) ". "
}

.body-container .primary h6:before {
    counter-increment: h6;
    content: counter(h1) "." counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) "." counter(h6) ". "
}

.body-container .primary .nocount:before {
    content: "";
    counter-increment: none
}

.body-container .primary .example {
    border-style: solid;
    border-width: 1px;
    border-color: #cccccc;
    border-radius: 4px;
    background-color: #e8f2fe;
    padding-top: 1ex;
    padding-bottom: 0.5ex;
    padding-right: 1em;
    padding-left: 1em;
    margin-bottom: 1ex;
}

.body-container .primary .inline-paramount {
    border-style: solid;
    border-width: 1px;
    border-color: #cccccc;
    border-radius: 4px;
    background-color: #e8f2fe;
    padding-top: 0ex;
    padding-bottom: 0.0ex;
    padding-right: 0em;
    padding-left: 0em;
    margin-bottom: 0ex;
}

.body-container .primary .web-link {
    background: #4178f0;
    color: #fff;
    padding: 10px 10px 10px 50px;
    display: block;
    position: relative;
}

.body-container .primary .web-link::before {
    content: "";
    position: absolute;
    left: 10px;
    height: 20px;
    width: 30px;
    border-right: 1px solid #fff;
    background: url(http://info.itemis.com/hubfs/Corporate_Website/itemis-cta-iconset.png?t=1504179064344) no-repeat -660px
        -46px transparent;
    background-size: 800px 600px;
}

.body-container .primary .web-link a {
    color: inherit;
    text-decoration: underline;
}

/* Add permalinks to headlines: */
.permalink {
    position: relative;
    -webkit-transition: none;
    -moz-transition: none;
    -o-transition: none;
    -ms-transition: none;
    transition: none;
    opacity: 0;
}

.permalink:after {
    content: " 🔗 ";
    font-size-adjust: 0.3;
}

.permalink .tooltip {
    display: none;
    opacity: 0;
    position: absolute;
    left: 0;
    bottom: 100%;
    background: #ccc;
    white-space: nowrap;
    padding: 5px 10px;
    font-size: 16px;
    border-radius: 5px;
    color: #000;
}

.permalink .tooltip:after {
    content: "";
    position: absolute;
    top: 100%;
    left: 10px;
    display: block;
    height: 0;
    width: 0;
    border: 7px solid;
    border-color: #ccc transparent transparent;
}

.permalink:hover .tooltip, .permalink:focus .tooltip, .permalink:active .tooltip {
    opacity: 1;
    display: block;
}

h1:hover .permalink, h2:hover .permalink, h3:hover .permalink, h4:hover .permalink, h5:hover .permalink, h6:hover .permalink
    {
    opacity: 1;
    visibility: visible;
    text-decoration: none;
}

.inline-navigation-previous {
    background-color: #f3f4f5;
    display: block;
    float: left;
    width: 48%;
    padding: 1.5%;
}

.inline-navigation-previous:before {
    content: "← ";
}

.inline-navigation-next {
    background-color: #f3f4f5;
    display: block;
    float: right;
    width: 48%;
    padding: 1.5%;
}

.inline-navigation-next:before {
    content: "→ ";
}